• SQL SERVER – Advantages of Partitioning – Quiz – Puzzle – 30 of 31

    Updated: 2012-01-31 01:30:43
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Performance impact: the cost of NUMA remote memory access

    Updated: 2012-01-30 23:17:20
    These days if you get a new server-class machine to run SQL Server, you can almost be 100% sure that it’ll be running on NUMA hardware. The current AMD Opteron and Intel Nehalem-based processors are all built on some form of NUMA architecture. The current consensus is that as the number of processors grows, their shared memory bus can easily get congested and becomes a major impediment to scalability. NUMA hardware solves this scalability challenge by dividing the processors into groups, with each...(read more)

  • OT: A Good Reason to Attend #SQLBits

    Updated: 2012-01-30 08:41:46
    My 4yo son keeps asking me why I should leave home so often to attend SQL conferences around the world and today, after a couple of days of snow, he discovered a good reason, along with the best place for the SQLBits scarf....(read more)

  • SQL SERVER – Data Collector Usage – Quiz – Puzzle – 29 of 31

    Updated: 2012-01-30 01:30:02
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • How to Document and Configure SQL Server Instance Settings

    Updated: 2012-01-30 00:00:00
    You can install identical databases on two different SQL Server instances, and they will behave in different ways. Why? Most likely, it is down to different configuration settings. There are around seventy of these settings and the DBA needs to be aware of the effect that many of them have. Occasionally, when you install identical databases on two different SQL Server instances, they will behave in surprisingly different ways. Why? Most likely, it is down to different configuration settings. There are around seventy of these settings and the DBA needs to be aware of the effect that many of them have. Brad McGehee explains them all in enough detail to help with most common configuration problems, and suggests some best practices.

  • Suggested Best Practises and naming conventions

    Updated: 2012-01-29 18:08:53
    THE SQL Server Blog Spot on the Web Welcome to SQLblog.com The SQL Server blog spot on the web Sign in Join Help in SSIS Junkie Entire Site Search Home Blogs Forums Downloads Opml SSIS Junkie Freelance SQL Server developer in London Suggested Best Practises and naming conventions Once upon a time I blogged at http : consultingblogs.emc.com jamiethomson but that ended in August 2009 when I left EMC . There is a lot of arguably valuable content over there however certain events in the past leave me concerned that that content is not well cared for and I don't have any confidence that it will still exist in the long term . Hence , I have taken the decision to re-publish some of that content here at SQLBlog so over the coming weeks and months you may find re-published content popping up here

  • SQL SERVER – Reclaiming Space Back from Database – Quiz – Puzzle – 28 of 31

    Updated: 2012-01-29 01:30:36
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • No respect: NUMA affinity meets query parallelism

    Updated: 2012-01-28 05:32:51
    What happens when NUMA affinity meets query parallelism? It gets no respect! SQL Server allows you to affinitize a TCP port to a specific NUMA node or a group of NUMA nodes. Books Online has an article on How to: Map TCP/IP ports to NUMA Nodes . And this BOL article discusses various NUMA affinity scenarios. Recently, I have been playing with NUMA affinity on various servers with hardware NUMA, such as those with Intel X5690 and Intel E7-4870, running SQL Server 2008 R2 RTM (10.50.1600) and SQL Server...(read more)

  • SQL SERVER – Lots of Date Functions – Find Right One to Use – Quiz – Puzzle – 27 of 31

    Updated: 2012-01-28 01:30:43
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • T-SQL stored procedure for finding/replacing strings in a text file. Really?

    Updated: 2012-01-27 05:33:11
    I know people have been doing all sorts of things with T-SQL, and I have absolutely no issue with people trying to push the limit of what T-SQL can do, or what you can use it to accomplish, especially when it’s for demonstration or pedagogical purposes, or as an intellectual exercise. But then I bumped into an article on writing a T-SQL stored procedure to find and replace strings in a text file. That really unsettled me! Sure, when you are in a hurry, you need to grab a tool--any tool--to get the...(read more)

  • SQL SERVER – Common Gotcha’s Associated with Common Table Expressions (CTE) – Quiz – Puzzle – 26 of 31

    Updated: 2012-01-27 01:30:27
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Bad Habits to Kick : Thinking a WHILE loop isn't a CURSOR

    Updated: 2012-01-26 21:50:00
    I see a lot of people suggest while loops instead of cursors in situations where row-based processing is required (or, at least, where folks think that row-based processing is required). Sometimes the justification is that constructing a while loop is simpler and more straightforward than constructing a cursor. Others suggest that a while loop is faster than a cursor because, well, it isn't a cursor. Of course the underlying mechanics still represent a cursor, it's just not explicitly stated that...(read more)

  • Optimize Table and Column Size in #PowerPivot and #BISM #Tabular #SSAS #VertiPaq

    Updated: 2012-01-26 20:54:36
    When you create a PowerPivot workbook or a BISM Tabular model (new in Analysis Services 2012), you store data by using the VertiPaq engine, which is an in-memory columnar database. Instead of considering the row of a table as the main unit of storage, it considers every column as a separate entity and stores data for every column in a separate way. This makes it very fast to query data for a single column, but requires a higher computational effort in order to retrieve data for several columns of...(read more)

  • SQLAuthority News – Interview with Book Authors after 2 Months of Book Released

    Updated: 2012-01-26 01:30:39
    Community is the most motivating force for me. I have often found situations where I have done more and better things because there was community around me. My latest book SQL Server Interview Questions and Answers is the result of the community’s support and love. Without the wide acceptance of the community I would have [...]

  • SQL SERVER – Different Aspect of Policy Based Management – Quiz – Puzzle – 25 of 31

    Updated: 2012-01-26 01:30:33
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Yet another gotcha: variables' scopes do not end where they should.

    Updated: 2012-01-25 22:09:00
    Be careful: unlike most other languages, T-SQL does not limit variables' scope to the block where the variable has been defined. For example, the following snippet compiles and runs: -- @to is not in scope yet -- the line below would not compile --SET @to = @to + 3 ; IF DATEPART ( weekday , GETDATE ()) = 3 BEGIN ; -- the scope of this DECLARE does not end when the block ends DECLARE @from INT , @to INT ; SELECT @from = 5 , @to = 7 ; SELECT Number FROM data.Numbers WHERE Number BETWEEN @from AND @to...(read more)

  • Whatever happened to Twitter Annotations?

    Updated: 2012-01-25 09:46:00
    THE SQL Server Blog Spot on the Web Welcome to SQLblog.com The SQL Server blog spot on the web Sign in Join Help in SSIS Junkie Entire Site Search Home Blogs Forums Downloads Opml SSIS Junkie Freelance SQL Server developer in London Whatever happened to Twitter Annotations In April 2010 Twitter announced a new feature that they would soon be introducing Twitter Annotations . Put simply Twitter Annotations can be described as the ability to attach metadata to a tweet think hashtags on steroids . Lots of people were quite excited about : it I love to sit on the beach . One of the coolest things about the beach is the number of layers of visual depth . Look at the sand and it's beautiful , but zoom your eyes in closer and you'll see a whole layer of life running around on the sand that you

  • Performance impact: SQL2008 R2 audit and trace

    Updated: 2012-01-25 03:29:27
    We are told that SQL Server 2008 R2 Audit (and SQL Server 2008 Audit) has much less performance overhead than SQL Trace when we try to capture the same information. Knowing how SQL Server R2 Audit is implemented (i.e. on top of the extended events infrastructure), I’ve always taken that as a given and never bothered to check it out. Recently, I had to capture some object access information, and it turned out that SQL Audit was not the most convenient tool for the task. I had to go back to SQL Trace....(read more)

  • SQL SERVER – Correct Value for Fillfactor – Quiz – Puzzle – 24 of 31

    Updated: 2012-01-25 01:30:45
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • OT: Noisy v. Important

    Updated: 2012-01-25 00:00:00
    A new personal blog post: Discerning Between Noisy and Important...(read more)

  • SQL SERVER – Database Mirroring and Fine-Prints – Quiz – Puzzle – 23 of 31

    Updated: 2012-01-24 01:30:41
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Team Foundation Server (TFS) in the Cloud - My Experience So Far

    Updated: 2012-01-24 00:45:13
    THE SQL Server Blog Spot on the Web Welcome to SQLblog.com The SQL Server blog spot on the web Sign in Join Help in Buck Woody Entire Site Search Home Blogs Forums Downloads Opml Buck Woody Carpe Datum Team Foundation Server TFS in the Cloud My Experience So Far I recently joined a software development project that involves not only myself and other internal Microsoft employees , but a partner and a customer as well . We are building a hybrid solution that uses assets on premises as well as Windows Azure for processing . When we put the team together we picked a methodology Agile for the project we use multiple methodologies at Microsoft whatever the project needs and then we started talking about Source Control . We’re all comfortable with various tools for check-in-check-out , branching

  • SQL Server 2012 : The "Launch Date" is not what you think it is

    Updated: 2012-01-23 21:58:00
    I see a lot of people getting really excited. There is a "virtual launch event" for SQL Server 2012 being held on March 7, 2012. You can read more about the event at http://sqlserverlaunch.com/ . Let me throw out a dose of reality: if you are not on a TAP or otherwise going live with a private build or release candidate, you will not be installing and deploying SQL Server 2012 on March 7th. I promise. This date will not mark a release, go-live, or general availability. These launch events are marketing-centric...(read more)

  • XEvents in SQL Server 2012: No more "lazy XML" in event harvesting scripts

    Updated: 2012-01-23 20:49:00
    : Home Syndication Log in XEvents in SQL Server 2012 : No more lazy XML in event harvesting scripts I've said before how thrilled I am will the new extended event UI in SSMS for SQL Server 2012. However , you might be one of the early adopters who made up their own scripts to define extended event sessions , and use hardcoded scripts to harvest the results . So , you may run into this problem if you're using what I call lazy XML in the event harvesting script . Take , as an example , an extended event session defined as follows with 3 actions : create event session errorsession on server add event sqlserver.error_reported action package0.callstack , nbsp sqlserver.session_id , nbsp sqlserver.sql_text where error 547 and package0.counter add target package0.ring_buffer with

  • Bad Habits to Kick : Using AS instead of = for column aliases

    Updated: 2012-01-23 17:31:00
    This one is quite subjective, and I'm sure I will face plenty of opposition - not only because it's a preference thing and many people are married to their preferences, but also because it violates the strict interpretation of the standard. Personally, I'm more worried about the former than the latter - I have no concerns whatsoever that SQL Server will eradicate the = notation for column aliases, nor do I worry that the code I write needs to work when ported to Oracle, DB2, MySQL, etc. (I highly...(read more)

  • SQL SERVER – What is Piecemeal Restore – Quiz – Puzzle – 22 of 31

    Updated: 2012-01-23 01:30:49
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Happy new year 新年快乐 for my Chinese readers!

    Updated: 2012-01-22 23:50:00
    If you have Chinese friends, it's time to say 新年快乐 to them! (Xīnnián kuàilè -> Pronounced like Shin Nien Kwai Ler) They are welcoming in the year of the dragon....(read more)

  • Presenting at MADPass Wednesday 25 Jan 2012!

    Updated: 2012-01-22 19:00:00
    I am honored to present Building Your First SSIS 2012 Package to the Madison Professional Association for SQL Server (MADPass) Wednesday, 25 Jan 2012! If you read this blog and will be in the Madison, Wisconsin area Wednesday, stop by and introduce yourself! I’m the fat guy with a fu. :{>...(read more)

  • Performance impact: hyperthreading on Intel Westmere-EP processors (X5690)

    Updated: 2012-01-22 06:41:23
    Recently, I have been looking into the performance impact of enabling hyperthreading on various platforms with various SQL Server workloads. All the results I have shared so far are from a DL580 G7 with four Westmere-EX  (E7-4870) processors. Overall, the results of enabling hyperthreading have been positive for both the tested reporting queries and the tested OLTP queries, although I did run into one exception where a reporting query workload performed better without hyperthreading . In all...(read more)

  • SQL SERVER – Difference between Create Index – Drop Index – Rebuild Index – Quiz – Puzzle – 21 of 31

    Updated: 2012-01-22 01:30:58
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • CPU benchmarking and time for an upgrade

    Updated: 2012-01-21 21:59:05
    Is your SQL Server running slower than you’d like? Is it your SQL Server configuration or your slightly old hardware? We need to use tools to gather information. My subjective impression is that my 2.2 GHz laptop outperforms my 3.0 GHz overclocked desktop in CPU bound tasks. Both are quad core machines. The desktop has a first generation quad and the laptop has a second generation quad core processor. To introduce objectivity, PassMark’s Performance Test was used to benchmark the two machines. If...(read more)

  • SQL SERVER – Methods for Accessing SQL Server XML Datatype – Quiz – Puzzle – 20 of 31

    Updated: 2012-01-21 01:30:15
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Blog Post #500 : 2011, a year in review

    Updated: 2012-01-20 19:55:00
    My favorite blog post Picking favorites is never easy. While I definitely feel like I had some more thought-provoking, controversial and laborious blog posts, my favorite would have to be my summary of 18456 errors: http://sqlblog.com/blogs/aaron_bertrand/archive/2011/01/14/sql-server-v-next-denali-additional-states-for-error-18456.aspx When I initially wrote that post, it started as a quick listing of the new states introduced in SQL Server 2012 (involving contained databases). When I started testing...(read more)

  • Bug-Out Bags and Cloud Architecture Considerations

    Updated: 2012-01-20 17:00:58
    THE SQL Server Blog Spot on the Web Welcome to SQLblog.com The SQL Server blog spot on the web Sign in Join Help in Buck Woody Entire Site Search Home Blogs Forums Downloads Opml Buck Woody Carpe Datum Bug-Out Bags and Cloud Architecture Considerations I served in the U.S . Military for a while , and as part of my training we had to maintain a Bug-Out Bag” , which was a large duffle-bag full of certain items that we could live on fight with in an emergency . I’ve carried the spirit of that idea forward with me into civilian life , in Florida and especially here in the Pacific . Northwest In Florida we dealt with the threat of hurricanes I went through four of those in one year that hit my area . You’re without power , it floods quickly , and it gets wicked hot . You roof might be gone ,

  • New cumulative Updates for SQL Server 2008 SP2/SP3 are available!

    Updated: 2012-01-20 16:07:00
    On Monday, I completely missed that the SQL Server Release Services team published two cumulative updates for SQL Server 2008. I'd blame jury duty, but that didn't start until Tuesday, and only lasted two days. Well, better late than never. Cumulative Update #8 for SQL Server 2008 Service Pack 2 KB : http://support.microsoft.com/kb/2648096 Build number : 10.00.4326 Number of fixes : 6 Relevant for : Builds of SQL Server where SELECT @@VERSION yields between 10.00.4000 and 10.00.4325 Cumulative Update...(read more)

  • Use VALUES clause to get the maximum value from some columns [SQL Server, T-SQL]

    Updated: 2012-01-20 13:22:00
    , THE SQL Server Blog Spot on the Web Welcome to SQLblog.com The SQL Server blog spot on the web Sign in Join Help in SSIS Junkie Entire Site Search Home Blogs Forums Downloads Opml SSIS Junkie Freelance SQL Server developer in London Use VALUES clause to get the maximum value from some columns SQL Server , T-SQL My ex-colleague Paul Mcmillan pointed me at a thread on Stack Overflow that demonstrated a neat T-SQL trick to get the maximum value from a collection of columns in a row . Paul had never seen it before and neither had I so I figure one or two of you out there might learn something from it . too In short you can use the VALUES clause to effectively union the values into a dataset and get the MAX from that dataset . Better demonstrated with : code DECLARE t TABLE a INT b INT c INT

  • On the Topic of Lost SA Passwords on SQL Server 2000…

    Updated: 2012-01-20 07:42:23
    THE SQL Server Blog Spot on the Web Welcome to SQLblog.com The SQL Server blog spot on the web Sign in Join Help in Argenis Fernandez Entire Site Search Home Blogs Forums Downloads Opml Argenis Fernandez On the Topic of Lost SA Passwords on SQL Server 2000 Since it looks like everything I blog about lately is showing how to get onto SQL instances to which you don’t have formal credentials , I figured what the heck let’s do a post on SQL 2000. Earlier on today Saurabh Sapra twitter sent a tweet to SQL Server MVP Thomas LaRock blog twitter To which Tom : replied I was flattered . But I had no posts on that subject . So in turn , I : replied It turns out that it is straightforward . And I will show you how to do just that recover the SA password of a SQL 2000 instance . It’s easier than you

  • SQL SERVER – MERGE or INSERT, UPDATE, DELETE – Quiz – Puzzle – 19 of 31

    Updated: 2012-01-20 01:30:31
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL SERVER – Importance of Resource Database – Quiz – Puzzle – 18 of 31

    Updated: 2012-01-19 01:30:20
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL Cop Review

    Updated: 2012-01-19 00:00:00
    Static code analysis is used a lot by application programmers, but there have been surprisingly few tools for SQL development that perform a function analogous to Resharper, dotTest, or CodeRush. Wouldn't it be great to have something that can indicate where there are code-smells, lapses from best practice and so on, in your Database code? Now there is.

  • SQL SERVER – Various Ways to Create Constraints – Quiz – Puzzle – 17 of 31

    Updated: 2012-01-18 01:30:27
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Great SQL Server Debates: Buffer Cache Hit Ratio

    Updated: 2012-01-18 00:00:00
    One of the more popular counters used by DBAs to monitor the performance, the Buffer Cache Hit Ratio, is useless as a predictor of imminent performance problems. Worse, it can be misleading. Jonathan Kehayias demonstrates this convincingly with some simple tests.

  • SQL Server 2012 FileTable and T-SQL on AlwaysOn secondary replicas

    Updated: 2012-01-17 20:01:00
    Home Syndication Log in SQL Server 2012 FileTable and T-SQL on AlwaysOn secondary replicas OK , back to PathName( with AlwaysOn , which I started on in the previous blog post PathName( in SQL Server 2012 doesn't return the computer name by default AlwaysOn1 or AlwaysOn2 in my example but returns the VNN name virtual network name That is , it returns the availability group listener share name . In my case , the PathName( would start with AlwaysOnAG1 There's an additional option in SQL Server 2012 PathName( that allows you to return the current replica name . So , when AlwaysOn1 is the current primary replica , it returns that when we fail over to AlwaysOn2 that's what name is returned . In addition , GetFileNamespacePath( and FileTableRootPath( always return the availability group listener

  • SQL Server 2012 FileTables - AlwaysOn support and PathName()

    Updated: 2012-01-17 18:03:00
    Home Syndication Log in SQL Server 2012 FileTable and T-SQL on AlwaysOn secondary replicas SQL Server 2012 FileTables AlwaysOn support and PathName( When I was covering the FileTable-specific functions and methods , I didn't mention PathName( a filestream-related function , that naturally can be used with FileTables . This posting is about PathName( but , mostly about what happens with FileTable in an AlwaysOn availability group configuration . There were some surprises there . None of the FileTable-specific functions and methods mention AlwaysOn , but PathName( mentions it . There is an additional parameter you can specify that matters if you use PathName( in an AlwaysOn availability group environment . Remember that , in addition to FileTable , there have been enhancements to filestream

  • SQL SERVER – CHECKPOINT Behavior and Database Recovery Models – Quiz – Puzzle – 16 of 31

    Updated: 2012-01-17 01:30:24
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Relational Databases and Solid State Memory: An Opportunity Squandered?

    Updated: 2012-01-17 00:00:00
    The relational model was devised long before computer hardware was able to deliver an RDBMS that could deliver a fully normalized database with no performance deficit. Now, with reliable SSDs falling in price, we can reap the benefits, instead of getting distracted by NOSQL with its doubtful compromise of 'eventual consistency'.

  • SQL Server 2012 FileTables in T-SQL part 3: hierarchyid methods

    Updated: 2012-01-16 21:06:00
    : Home Syndication Log in SQL Server 2012 FileTables in T-SQL part 3 : hierarchyid methods So finally , we get to using FileTable's path_locator column with the methods of hierarchyid . To pick up where we left off remember that hierarchyid has a method named GetLevel( Given the following directory structure in the FileTable's share : File1.txt File2.txt SQLFiles SubdirFile1.txt SubdirFile2.txt I have a few more levels of subdirectory here , but hopefully , you get the idea . Issuing the query SELECT path_locator.GetLevel( as Level , Name FROM dbo.Documents show , unsurprisingly , File1.txt , File2.txt , and SQLFiles directory at level 1, and the subdirectory files at level 2. So to be sure we're getting the right SQLFiles directory , we could change that query in the previous blog entry

  • SQL Server 2012 FileTables in T-SQL part 2: new rows

    Updated: 2012-01-16 16:00:00
    : Home Syndication Log in SQL Server 2012 FileTables in T-SQL part 2 : new rows So the functions methods that I wrote about in previous post are needed because FileTables don't store the UNC path name of the file , they store the path_locator as a hierarchyid data type . Wonder what encoding scheme they're using . Let's see , by doing SELECT path_locator.ToString( Name FROM dbo.Documents We get hierarchyid strings that look like this : 192992825631153.73945086322524.2119705196 Turns out that the encoding scheme involves newid( as you can see by looking at the definition for the default constraint for the path_locator column . It looks like this : convert(hierarchyid , convert(varchar(20 convert(bigint , substring(convert(binary(16 newid( 1, 6 convert(varchar(20 convert(bigint ,

  • Dynamically creating Excel File, ExcelSheets and Exporting Data from SQL Server using SSIS 2005

    Updated: 2012-01-16 07:05:00
    Export SQL Server Tables to Excel Files Dynamically

  • SQL Server 2012 FileTables in T-SQL part 1: functions and methods

    Updated: 2012-01-16 06:17:00
    : Home Syndication Log in SQL Server 2012 FileTables in T-SQL part 1 : functions and methods I've been working with the SQL Server 2012 FileTable feature lately . Besides learning to appreciate the esoteric features of the NTFS file system and SMB protocol , only some of which are supported by FileTables , I've been trying to work with FileTables in SQL Server using T-SQL . This turns out to be an interesting exercise , especially if you're trying to brush up on your skills with the hierarchyid data type . It turns out that a FileTable is just like a normal SQL Server table with a filestream varbinary(max column named , unsurprisingly , file_stream It uses computed columns and constraints rather extensively . Behind the scenes , SQL Server functions as a Win32 namespace owner and exposes a

  • SQL SERVER – Difference between CHAR, VARCHAR, NVARCHAR and VARCHAR(MAX) – Quiz – Puzzle – 15 of 31

    Updated: 2012-01-16 01:30:18
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL SERVER – Using SafePeak to Accelerate Performance of 3rd Party Applications

    Updated: 2012-01-16 01:30:17
    An exciting solution I found last year (2011) for SQL Server performance acceleration is SafePeak. Designed to specifically to accelerate and tune performance of cases where you have minimum control on the applications, like 3rd party line of business applications. SafePeak performs automated caching of queries and procedures results, returning with very high speed results [...]

  • SQL SERVER – Cases When Stored Procedure RECOMPILE – Quiz – Puzzle – 14 of 31

    Updated: 2012-01-15 01:30:26
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL SERVER – Debate – Table Variables vs Temporary Tables – Quiz – Puzzle – 13 of 31

    Updated: 2012-01-14 01:30:40
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL SERVER – DACPAC and SQL Azure – Quiz – Puzzle – 12 of 31

    Updated: 2012-01-13 01:30:27
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • At Tech Days in The Netherlands next month

    Updated: 2012-01-12 07:17:00
    Just confirmed that I'll be speaking at TechDays 2012 NL in Den Haag. I'll be speaking n Feb 16th and 17th, and 'm really looking forward to it. I'll be doing some talks on SQL Server 2012 and SQL Azure Database features including T-SQL improvements, filetable/filestream, SQL Azure Federations, and others. It will be nice to catch up with friends, and I hope to see you'all there. Stop by and say hi. @bobbeauch

  • SQL SERVER – Non-Clustered Index and Automatic Rebuild – Quiz – Puzzle – 11 of 31

    Updated: 2012-01-12 01:30:22
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL SERVER – A Quick Look at expressor Data Quality Solutions

    Updated: 2012-01-11 01:30:47
    Last month I described the extension framework that allows one to easily add functionality to an expressor Studio installation.  I then used this added functionality – the input and output operators to SalesForce.com – to develop an example application.  But expressor has a second mechanism that allows you to easily enhance the functionality of your installation – [...]

  • SQL SERVER – Reasons for Using Output Clause – Quiz – Puzzle – 10 of 31

    Updated: 2012-01-11 01:30:43
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • SQL SERVER – Locking, Blocking and Deadlock – Quiz – Puzzle – 9 of 31

    Updated: 2012-01-10 01:30:52
    Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to [...]

  • Expertseminarium in April: Performance for Developers in SQL Server 2012

    Updated: 2012-01-09 07:10:00
    : Home Syndication Log in At Tech Days in The Netherlands next month Expertseminarium in April : Performance for Developers in SQL Server 2012 I've had the good fortune to be invited back to Stockholm as part of Addskills Expertseminarium Series This seminar , An In-Depth Look at Developer Features and Performance in SQL Server 2012, will be two days of studying performance , diagnostic tools and other features on Microsoft's latest release of SQL Server . We'll look at T-SQL coding improvements , examine new information available in query plans and extended events , and other features that could change how you work with SQL Server in applications . Join me and the folks at Addskills for two information-packed days on 3-4 Apr . See you in the spring bobbeauch Categories : 8. January 2012

  • Tom LaRock's SQL Server Howlers

    Updated: 2012-01-05 00:00:00
    In this next article in our series where well-known SQL Server people write about their favorite SQL Server Howlers, we asked Tom Larock for his top five common misunderstandings about how SQL Server works that end in tears, and plaintive forum questions.

  • SQLskills Developer Immersion Events this year

    Updated: 2012-01-04 19:01:00
    Home Syndication Log in Expertseminarium in April : Performance for Developers in SQL Server 2012 SQLskills Developer Immersion Events this year Just back from a small hiatus and getting my schedule together for the first half of the year . One thing I'm really looking forward to is the two public SQLskills Immersion Events for developers . These are week-long events taught specifically for developers , but that doesn't mean I'm doing shallow coverage by any means . One of the folks last year in Chicago made illusions to drinking from a firehose another delegate said he was afraid to leave his seat for 5 minutes because he'd miss too much . All of the feature are presented with performance in mind , naturally . And , like last year , I've grafted in all new SQL Server 2012 developer

  • Window Functions in SQL Server: Part 3: Questions of Performance

    Updated: 2012-01-04 00:00:00
    A SQL expression may look elegant on the page but it is only valuable if its performance is good. Do window functions run quicker than their conventional equivalent code? Fabiano gives a definitive answer.

  • Incorporating XML into your Database Objects

    Updated: 2012-01-04 00:00:00
    XML data can become a full participant in a SQL Server Database, and can be used in views, functions, check constraints, computed columns and defaults. Views and table-valued functions can be used to provide a tabular view of XML data that can be used in SQL Expressions. Robert Sheldon explains how.

Current Feed Items | Previous Months Items

Dec 2011